package com.itlaobing.service;

import java.sql.SQLException;
import java.util.List;

import com.itlaobing.dao.UserOrdersDao;
import com.itlaobing.exception.MyException;

import cn.itlaobing.model.UserOrdersModel;

public class UserOrdersService {
	private UserOrdersDao uod=new UserOrdersDao();
	public List<UserOrdersModel> queryAllById(Integer id)throws MyException
	{
		try {
			return uod.queryAllById(id);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
			throw new MyException(e.getMessage());
		} catch (SQLException e) {
			e.printStackTrace();
			throw new MyException(e.getMessage());
		}finally
		{
			try {
				uod.close();
			} catch (SQLException e) {
				e.printStackTrace();
				throw new MyException(e.getMessage());
			}
		}
	}
}
